package com.example.consumer.controller;

import com.example.api.AppService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 */
@RestController
public class ConsumerController {
    @Autowired
    private UserConfig userConfig;

    @DubboReference
    private AppService appService;

    @GetMapping("/getPort")
    public String getPort() {
//        return userConfig.getAddress() + userConfig.getAge();
        return appService.getPort();
    }
}
